<template>
  <div class="demo">
    <h2>学校名称：{{ name }}</h2>
    <h2>学校地址：{{ address }}</h2>
    <button @click="showName">显示学校名称</button>
  </div>
</template>

<script>
export default {
  name: "School",
  data() {
    return {
      name: "abc",
      address: "深圳"
    }
  },
  computed: {},
  components: {},
  methods: {
    showName(e) {
      alert(this.name);
    }
  },
  watch: {},
  filters: {},
  directives: {}
}
</script>

<style scoped>
  .demo {
    background-color: gray;
  }
</style>